import React from 'react'

import { useNavigate } from 'react-router-dom'

export default function () {
  const navigate = useNavigate()
  return (
    <div>
      <h1 style={{ color: 'red' }}>404</h1>
      <p>
        您访问的页面不存在{' '}
        <button
          onClick={() => {
            navigate('/home')
          }}
        >
          回到首页
        </button>
      </p>
    </div>
  )
}
